package com.tear.language.node;

import java.util.Map;

import net.sf.json.JSONObject;

import com.tear.language.utils.Attrs;

/**

	选择操作--类似与switch-case中的default

*/
public class OtherNode extends BaseNode {

	@Override
	public boolean parse(Map<String, Object> currParams, Map<String, Object> globalParams, JSONObject obj) throws Exception {
		boolean whenFlag = false;
		if(currParams.containsKey(Attrs.WHEN_FLAG)) {
			whenFlag = (Boolean)currParams.get(Attrs.WHEN_FLAG);
		}
		currParams.remove(Attrs.WHEN_FLAG);
		return !whenFlag;
		
	}

}
